<template>
  <div>
    <button @click="additionHandle">+加法器</button>
  </div>
</template>

<script>
import eventBus from '@/utils/eventBus'
export default {
  name: 'child-1',
  data() {
    return {
      num: 1
    }
  },
  methods: {
    additionHandle() {
      eventBus.$emit('addition', {
        num: this.num++
      })
    }
  }
}
</script>

<style lang="scss" scoped></style>
